<template>
    <a-form>
        <a-row class="innov-seacher" :gutter="24">
            <a-col span="6">
                <a-form-item label="项目名称">
                    <a-input placeholder="项目名称" v-model:value="props.params.projectName" @pressEnter="onEnter" />
                </a-form-item>
            </a-col>
            <a-col span="6">
                <a-form-item label="项目成员">
                    <a-input placeholder="输入学号或姓名" v-model:value="props.params.projOwner" @pressEnter="onEnter" :disabled="props.params.lockOwner" />
                </a-form-item>
            </a-col>
            <a-col span="6">
                <a-form-item label="指导教师">
                    <a-input placeholder="输入导师工号或姓名" v-model:value="props.params.guideTeacher" @pressEnter="onEnter" :disabled="props.params.lockTeacher" />
                </a-form-item>
            </a-col>
            <a-col span="6">
                <dict-select dict="项目级别" width="100%" v-model:value="props.params.projectLevel" @change="onEnter" />
            </a-col>
        </a-row>
        <a-row :gutter="24">
            <a-col span="4">
                <dict-select prefix="申请表状态" dict="申请表状态" width="100%" v-model:value="props.params.projStatus" @change="onEnter" />
            </a-col>
            <a-col span="4">
                <dict-select :dict="fullProcessDict" width="100%" v-model:value="props.params.fullStatus" @change="onEnter"/>
            </a-col>
            <a-col span="4">
                <dict-select :dict="typeDict" width="100%" v-model:value="props.params.projectType" @change="onEnter"/>
            </a-col>
            <a-col span="4">
                <depart-select prefix="负责学院" empty="请选择部门" schema="学院" width="100%" v-model:value="props.params.departId" @change="onEnter" :disabled="props.params.lockDepartId" />
            </a-col>
            <a-col span="4">
                <year-select width="100%" v-model:value="props.params.applyYear" @change="onEnter" />
            </a-col>
            <a-col span="4">
                <dict-select :dict="batchDict" width="100%" v-model:value="props.params.batch" @change="onEnter" />
            </a-col>
        </a-row>
    </a-form>
</template>

<script setup>
import app from '@/app'
import { computed, ref } from 'vue'
import { yearDict, batchDict, fullProcessDict } from '../ProjectOption'

const props = defineProps({
    projectTypes: {
        type: Array,
        default: ["创新训练", "创业训练", "创业实践"]
    },
    params: Object
});

const emits = defineEmits(["onEnter"]);

const typeDict = app.buildDictionary("项目类型", { DataKey: props.projectTypes.join(','), DataValue: "请选择类型"}, props.projectTypes);
const full = ref("-1");

function onEnter () {
    emits("onEnter");
}
</script>

<style lang="less"></style>../ProjectOption